public class test2 {
    public static void main(String[] args) {
        int sum=0;
        int i=0;
        System.out.print("奇数为：");
        for ( i = 0; i <=10 ; i++) {
            if (i % 2 == 0) {
                continue;
            }
            System.out.print(" "+i);
            sum+=i;
    }
        System.out.println();
        System.out.println("sum="+sum);
    }

}
